package moe.entity;

import java.io.File;

public class Collection {
	private long id, library_id;
	private String name;
	private int version;

	@Transient
	private String filePath;

	public Collection(long id, long libraryId, int version, File file) {
		this.id = id;
		this.library_id = libraryId;
		this.version = version;
		this.filePath = file.getPath();
		name = file.getName();
	}

	public Collection(long id, long libraryId, int version, String dir, String name) {
		this.id = id;
		this.library_id = libraryId;
		this.version = version;
		this.name = name;
		if (!dir.endsWith(File.separator)) {
			dir += File.separator;
		}
		this.filePath = dir + name;

	}

	public long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public int getVersion() {
		return version;
	}

	public long getLibraryId() {
		return library_id;
	}

	public String getFilePath() {
		return filePath;
	}

}
